package com.myphoto.base.config.properties;

import com.myphoto.base.annotation.DevProfile;
import com.myphoto.base.annotation.ProductProfile;
import org.springframework.beans.BeanUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@ConfigurationProperties(prefix = "config")//这里报路径重复不用管
@PropertySource("classpath:/config/config-dev.properties")
@DevProfile
public class ConfigDev extends Config implements IConfig {

    @Override
    public Config getConfig() {
        Config config = new Config();
        BeanUtils.copyProperties(this,config);
        return config;
    }
}
